<div class="col-md-12 col-sm-12 col-xs-12">
    <div class="x_panel">
        <div class="x_title">
            <h2>{$pri_name} <small></small></h2>
            <ul class="nav navbar-right panel_toolbox">
<!--                {:check_create('create',['type_id'=>input('type_id')])}-->
            </ul>
            <div class="clearfix"></div>
        </div>
        <div class="x_content">
            <p class="text-muted font-13 m-b-30">
                <code>说明:</code>{$code}
            </p>


            <form id="search" action="{:url('index')}" />
<!--            {foreach :input() as $key => $value}-->
<!--            <input type="hidden" name="{$key}" class="form-control" value="{$value}">-->
<!--            {/foreach}-->
            <input type="hidden" name="page" value="1"/>
            <div class="well" style="overflow: auto">
                <div class="col-md-2">
                    <input type="text" name="title" autocomplete="off" class="form-control" placeholder="请输入搜索内容..." value="{:input('title')}">
                </div>
                <div class="col-md-2">
                    <select onchange="qiehuan()" name="status" class="select2 js-states form-control"  style="width: 100%;">
                        <option value="0">订单状态</option>
                        {volist name="$status" id="item"}
                        {if $key<=10 && !in_array($key,[5,7])}
                        <option value="{$key}" {eq name=":input('status')" value="$key"}selected{/eq}>{$item}</option>
                      {/if}}
                        {/volist}
                    </select>
                </div>
                <div class="col-md-2">
                    <select name="goods_data" class="select2 js-states form-control" style="width: 100%;">
                        <option value="0">商品全部</option>
                        {volist name="$goods" id="item"}
                        <option value="{$item.id}" {eq name=":input('goods_data')" value="$item.id"}selected{/eq}>{$item.title}</option>
                        {/volist}
                    </select>
                </div>
                <div class="col-md-1">
                    <select name="is_refund" class="select2 js-states form-control"  style="width: 100%;">
                        <option value="0">退款状态</option>
                        <option value="1" {eq name=":input('is_refund')" value="1"}selected{/eq}>未退款</option>
                        <option value="2" {eq name=":input('is_refund')" value="2"}selected{/eq}>已退款</option>
                    </select>
                </div>
                <div class="col-md-1">
                    <select name="pay_type" class="select2 js-states form-control"  style="width: 100%;">
                        <option value="0">支付方式</option>
                        <option value="1" {eq name=":input('pay_type')" value="1"}selected{/eq}>微信</option>
                        <option value="3" {eq name=":input('pay_type')" value="3"}selected{/eq}>积分</option>
                    </select>
                </div>

<!--                <div class="col-md-1">-->
<!--                    <select onchange="qiehuan()" name="type_id" class="select2 js-states form-control"-->
<!--                            style="width: 100%;">-->
<!--                        <option value="0">订单类型</option>-->
<!--                        <option value="1" {eq name=":input('type_id')" value="1" }selected{-->
<!--                        /eq}>礼包</option>-->
<!--                        <option value="2" {eq name=":input('type_id')" value="2" }selected{-->
<!--                        /eq}>商品</option>-->
<!--                    </select>-->
<!--                </div>-->

<!--                <div class="col-md-1">-->
<!--                    <select onchange="qiehuan()" name="distribution_type_id" class="select2 js-states form-control"  style="width: 100%;">-->
<!--                        <option value="0">全部配送方式</option>-->
<!--                        <option value="1" {eq name=":input('distribution_type_id')" value="1"}selected{/eq}>快递邮寄</option><option value="2" {eq name=":input('distribution_type_id')" value="2"}selected{/eq}>门店自提</option>-->
<!--                    </select>-->
<!--                </div>-->
<!--                <div class="col-md-2">-->
<!--                    <select name="member_id" class="select2 js-states form-control"  style="width: 100%;">-->
<!--                        <option value="0">全部会员</option>-->
<!--                        {volist name="$member" id="item"}-->
<!--                        <option value="{$item.id}" {eq name=":input('member_id')" value="$item.id"}selected{/eq}>{$item.mobile}</option>-->
<!--                        {/volist}-->
<!--                    </select>-->
<!--                </div>-->
                <div class="col-md-2">
                    <input type="text" name="create_time" autocomplete="off" class="form-control" id="interval_timer" style="width: 100%" placeholder="请选择时间区间..." value="{:input('create_time')}">
                </div>

                <div class="col-md-1">
                    <button type="submit" class="btn btn-success">搜 索</button>
                </div>
                </form>

<!--                <div>-->
<!--                    <div class="col-md-6 a">-->
<!--                        <form id="import" enctype="multipart/form-data" method="post" action="{:url('read')}">-->
<!--                            <input style="width: 220px;height: 34px;"  class="btn btn-success " type="file" value="上传" name="read"/>-->
<!--                            <input type="submit" id="upload" class="btn btn-primary" value="上传文件"/>-->
<!--                            &lt;!&ndash;                            <a class="btn btn-success" id="write">导出</a>&ndash;&gt;-->
<!--                        </form>-->
<!--                    </div>-->
<!--                </div>-->

            </div>



            <div style="overflow: auto">
                <table id="datatables" class="table table-striped table-bordered">
                    <thead>
                    <tr>
                        <!--<th><input type="checkbox" onclick="CheckAll(this.checked)"></th></th>-->
                        <th>
                        <input type="checkbox" onclick="CheckAll(this.checked)"></th>
                    </th>
                        <th width="40" style="text-align: center;">ID</th>
                        <th >登录会员ID</th>
                        <th >登录手机号</th>
                        <th >登录人姓名</th>
                        <th >订单号</th>
                        <th >收货人</th>
                        <th >收货人手机号</th>
                        <th >订单金额</th>
                        <th >商品支数</th>
                        <th >佣金奖励</th>
                        <th >积分奖励</th>
                        <th >红包奖励</th>
                        <th >剩余</th>
                        <th >支付方式</th>
<!--                        <th >地址</th>-->
                        <th width="60">状态</th>
                        <th width="140">是否退款</th>
                        <th width="140">创建时间</th>

                        <th width="130">操作</th>
                    </tr>
                    </thead>

                    <form id="form_volist">
                     <tbody>
                        {volist name="data" id="vo"}
                        <tr>
                            <th width="20">
                        <input type="checkbox" name="id[]" value="{$vo.id}"/>
                    </th>
                            <td width="40" style="text-align: center;"><a href="{:url('MemberBrokerage/index',['title'=>$vo.order_number])}">{$vo.id}</a> </td>
                            <td>{$vo.member_id}</td>
                            <td>{$vo.member_mobile}</td>
                            <th >{$vo.member_nickname}</th>
                            <td>{$vo.order_number}</td>
                            <td>{$vo.name}</td>
                            <td>{$vo.mobile}</td>
                            <td>{$vo.total_price}</td>
                            <td>{$vo.make_order_count}</td>
                            <td>{$vo.total_brokerage}</td>
                            <td>{$vo.total_brokerage2}</td>
                            <td>{$vo.total_brokerage3}</td>
                            <td>{$vo.total_brokerage4}</td>
                            <td>{$vo.pay_title}</td>
<!--<td>{$vo.distribution_type}</td>-->
<!--                            <td>{:strLength($vo.address,20)}</td>-->
<td align="center">
                               {$vo.status_text}
                            </td>
                            <td align="center">
                                {$vo.refund_title}
                            </td>
                            <td>{$vo.create_time}</td>

                            <td>
                                {:check_update('update',['id' => $vo.id])}

                            </td>
                        </tr>
                        {/volist}
                    </tbody>
                    </form>


                    <tfoot align="left">
                    <tr>
                        <td colspan="100">
                            <span>控制：</span>
                            <a href="{:session(request()->controller().'_url_excel')}" style="color:#428BCA;cursor: pointer" >导出数据</a>
                        </td>
                    </tr>
                    </tfoot>


                </table>
            </div>
            <div>
            订单总金额:{$total_price} 元 订单数量:{$total_num} 商品数量:{$goods_sum} 商品支数:{$goods_sum2}
            </div>
            <div style="text-align: right;">{$data|raw}</div>
        </div>
    </div>
</div>
<script>
    function qiehuan() {

        $('#search').submit();
    }
</script>
<style>
    .a input{ display: block!important;float: left!important;}
</style>
<script>
    $('#upload').click(function () {
        $("#import").submit();
    });
</script>

